<!DOCTYPE html>

<html class="x-admin-sm">

<head>
    <meta charset="UTF-8" />
    <title></title>
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <!-- <link rel="stylesheet" href="./lib/layui/css/layui.css" /> -->
    <link rel="stylesheet" href="./css/font-awesome.css" />
    <link rel="stylesheet" href="./css/xadmin.css" />
    <!-- <link rel="stylesheet" href="./css/laydate.css" /> -->
    <link rel="stylesheet" href="./lib/jedate-6.5.0/test/jeDate-test.css" />
    <link rel="stylesheet" href="./lib/layui/css/layui.css" />
    <link rel="stylesheet" href="./css/article.css" />
    <style>
        .one3 {
            width: 100px;
        }
        
        #card_y {
            width: 600px;
            height: 520px;
        }
        
        .layui-tab-title li {
            font-weight: 700;
            font-size: 16px;
            color: #606266;
        }
    </style>

</head>

<body>
    <div class="x-nav">
        <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">演示</a>
        <a><cite>导航元素</cite></a>
      </span>
        <a class="layui-btn layui-btn-small" style="line-height: 1.6em; margin-top: 3px; float: right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height: 30px"></i>
        </a>
    </div>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-card">
                <div class="layui-card-body">
                    <!-- 筛选区域 -->
                    <form class="layui-form" id="selectForm" style="margin-left: -45px">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">标题</label>
                            <div class="layui-input-block">
                                <input type="text" name="title" id="title" placeholder="请输入标题" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">分类</label>
                            <div class="layui-input-block">
                                <input type="text" name="cateid" id="select" placeholder="请输入标题" autocomplete="off" class="layui-input" />
                            </div>
                        </div>

                        <!-- 时间选择框 -->
                        <div class="layui-inline getTime">
                            <!-- 注意：这一层元素并不是必须的 -->
                            <label class="layui-form-label">时间</label>
                            <input type="text" class="layui-input" name="create_date" id="test1" placeholder="   开始时间        至        结束时间" />
                        </div>
                        <!-- 时间选择框 -->
                        <!-- 按钮 -->
                        <div class="layui-form-item layui-inline getBtn">
                            <div class="layui-input-block">
                                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="*">
                    <i class="layui-icon layui-icon-search"></i>
                    搜索
                  </button>

                                <button type="reset" class="layui-btn layui-btn-primary" id="resetBtn">
                    <i class="layui-icon layui-icon-refresh-1"></i>
                    重置
                  </button>
                            </div>
                        </div>
                    </form>
                    <!-- 按钮 -->
                    <div class="box">
                        <div class="lt">
                            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo" id="btnAdd">
                  <i class="layui-icon layui-icon-add-1"></i>
                  新增
                </button>
                            <button type="reset" class="layui-btn layui-btn-warm" id="export">
                  <i class="layui-icon layui-icon-release"></i>
                  导出
                </button>
                        </div>
                        <div class="rt">
                            <span id="vanishTop"><i class="layui-icon layui-icon-up"></i></span>
                            <span id="vanishDown" style="display: none"><i class="layui-icon layui-icon-down"></i></span>
                            <i class="layui-icon layui-icon-refresh" id="i_reload"></i>
                            <i class="layui-icon layui-icon-app" id="table_xl"></i>
                        </div>
                    </div>
                  
                    <table class="layui-table">
                        <colgroup>
                            <col />
                            <col />
                            <col />
                            <col />
                            <col />
                            <col />
                            <col />
                            <col />
                            <col />
                        </colgroup>
                        <!-- 表单公共头部 -->
                        <thead>
                            <tr>
                                <th class="xl_one1">ID</th>
                                <th class="xl_one2">标题</th>
                                <th class="xl_one3">分类名</th>
                                <th class="xl_one4">图片</th>
                                <th class="xl_one5">创建时间</th>
                                <th class="xl_one6">是否推荐</th>
                                <th class="xl_one7">是否置顶</th>
                                <th class="xl_one8">文章状态</th>
                                <th class="xl_one9">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                                <!-- 动态创建的内容存放处 -->
                        </tbody>

                    </table>
                    
                    <!-- 分类筛选器隐藏的下拉盒子 -->
                    <div class="adv-box">
                        <div>
                            <input class="check check1" data-checked="0" type="checkbox" /> id
                        </div>
                        <div>
                            <input class="check check2" data-checked="1" type="checkbox" /> 标题
                        </div>
                        <div>
                            <input class="check check3" data-checked="2" type="checkbox" /> 分类名
                        </div>
                        <div>
                            <input class="check check4" data-checked="3" type="checkbox" /> 图片
                        </div>
                        <div>
                            <input class="check check5" data-checked="4" type="checkbox" autocomplete="off" /> 创建时间
                        </div>
                        <div>
                            <input class="check check6" data-checked="5" type="checkbox" /> 是否推荐
                        </div>
                        <div>
                            <input class="check check7" data-checked="6" type="checkbox" /> 是否置顶
                        </div>
                        <div>
                            <input class="check check8" data-checked="7" type="checkbox" /> 文章状态
                        </div>
                        <div>
                            <input class="check check9" data-checked="8" type="checkbox" /> 操作
                        </div>
                    </div>
                    <!-- 分页区域 -->
                    <div id="paging"></div>
                </div>
            </div>
        </div>
    </div>
    <!-- 渲染页面数据表单全部内容    动态创建的 -->
    <script type="text/html" id="titleTpl">
        {{each data}}
        <tr>
            <td class="xl_one1">{{$value.id}}</td>
            <td class="xl_one2">{{$value.title}}</td>
            <td class="xl_one3">{{$value.catename}}</td>
            <td class="xl_one4">
                <img src="http://124.223.14.236:8060/{{$value.pic}}" alt="" />
            </td>
            
            <td class="xl_one5">{{$value.create_date | tplTime}}</td>
            <td class="xl_one6">
                <form action="" class="layui-form">
                    <div class="layui-form-item">
                        <label class="layui-form-label"></label>
                        <div class="layui-input-block" style="margin-top:15px">
                            {{ if $value.ishot== 0 }}
                            <input type="checkbox" name="switch" lay-skin="switch" class="switch" /> {{else}}
                            <input type="checkbox" name="switch" lay-skin="switch" class="switch" checked /> {{/if}}
                        </div>
                    </div>
                </form>
            </td>
            <td class="xl_one7">
                <form action="" class="layui-form">
                    <div class="layui-form-item">
                        <label class="layui-form-label"></label>
                        <div class="layui-input-block" style="margin-top:15px">
                            {{ if $value.istop== 0 }}
                            <input type="checkbox" name="switch" lay-skin="switch" class="switch2" /> {{else}}
                            <input type="checkbox" name="switch" lay-skin="switch" class="switch2" checked /> {{/if}}
                        </div>
                    </div>
                </form>
            </td>
            <td class="xl_one8">
                <button type="button" class="layui-btn  layui-btn-primary layui-border-orange">已发布</button>
            </td>
            <td class="xl_one9">
                <div class="one3">
                    <button type="button" class="layui-btn layui-btn-xs layui-btn-normal one4 one_two" id="editBtn" data-id="{{ $value.id }}">修改</button>
                    <button type="button" class="layui-btn layui-btn-xs layui-btn-danger one4 one_two" id="btnDel" data-id="{{ $value.id }}">删除</button>
                </div>
            </td>
        </tr>
        {{/each}}
    </script>

    <!-- 添加数据弹出框 -->
    <script type="text/html" id="addListTpl">
        <form class="layui-form" id="addFormList" enctype="multipart/form-data" lay-filter="addFormList">
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                <div class="layui-tab-content"></div>
            </div>
            <div class="layui-tab layui-tab-card" id="card_y">
                <ul class="layui-tab-title">
                    <li class="layui-this">基础信息</li>
                    <li>SEO信息</li>
                    <li>文章内容</li>
                </ul>
                <div class="layui-tab-content" style="height: 100px;">
                    <div class="layui-tab-item layui-show">
                        <div class="layui-form-item">
                            <label class="layui-form-label">标题</label>
                            <div class="layui-input-block">
                                <input type="text" name="title" required lay-verify="required" placeholder="请输入标题名称" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">作者</label>
                            <div class="layui-input-block">
                                <input type="text" name="author" required lay-verify="required" placeholder="请输入作者" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">分类</label>
                            <div class="layui-input-block" style="width: 200px;">
                                <select name="city" lay-verify="required" type="text" name="cateid" required lay-verify="required" placeholder="请输入分类名" autocomplete="off" class="layui-input" id="catename"></select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">阅读次数</label>
                            <div class="layui-input-block">
                                <input type="text" name="click" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">创建时间</label>
                            <div class="layui-inline">
                                <!-- 注意：这一层元素并不是必须的 -->
                                <input type="text" class="layui-input" id="time_text" placeholder="请输入时间" autocomplete="off" />
                            </div>
                        </div>
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">是否推荐</label>
                            <input type="checkbox" lay-skin="switch" lay-text="ON|OFF" id="tuijian1" />
                        </div>
                        <div class="layui-form-item layui-inline" style="margin-left: 10px">
                            <label class="layui-form-label">是否置顶</label>

                            <input type="checkbox" lay-skin="switch" lay-text="ON|OFF" class="switch2" id="tuijian2" />
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">收藏数量</label>
                            <div class="layui-input-block">
                                <input type="text" name="lovenum" required lay-verify="required" placeholder="请输入收藏数量的名称" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">文章缩略图</label>
                            <div class="layui-input-block">
                                <input type="file" name="file" id="files" required lay-verify="required" placeholder="" autocomplete="off" style="display: none;" class="layui-input" />
                                <button type="button" class="layui-btn layui-btn-xs" id="addFile2">上传文件</button>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">文章标签</label>
                            <div class="layui-input-block">
                                <input type="text" name="tags" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item">
                        <div class="layui-form-item layui-form-text" style="margin-top: 60px;">
                            <label class="layui-form-label">seo关键字</label>
                            <div class="layui-input-block">
                                <textarea name="keywords" placeholder="请输入seo关键字名称" class="layui-textarea"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text" style="margin-top: 60px;">
                            <label class="layui-form-label">seo的描述</label>
                            <div class="layui-input-block">
                                <textarea name="description" placeholder="请输入seo的描述" class="layui-textarea"></textarea>
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item">
                        <div class="layui-form-item layui-form-text" style="margin-top: 80px;">
                            <label class="layui-form-label">文章内容</label>
                            <div class="layui-input-block">
                                <textarea name="content" placeholder="请输入文章内容名称" style="height:200px ;" class="layui-textarea"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item get_up bottom">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即发布</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    <button class="layui-btn layui-btn-warm" id="backBtn">返回列表</button>
                </div>
            </div>
        </form>
    </script>


    <!-- 修改数据弹出层 -->
    <script type="text/html" id="addTplList">
        <form class="layui-form" id="addFormList1" enctype="multipart/form-data" lay-filter="addFormList">
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                <div class="layui-tab-content"></div>
            </div>
            <div class="layui-tab layui-tab-card" style="height:550px ;">
                <ul class="layui-tab-title">
                    <li class="layui-this">基础信息</li>
                    <li>SEO信息</li>
                    <li>文章内容</li>
                </ul>
                <!-- 基础信息模块内容 -->
                <div class="layui-tab-content" style="height: 100px;">
                    <div class="layui-tab-item layui-show">
                        <div class="layui-form-item">
                            <label class="layui-form-label">标题</label>
                            <div class="layui-input-block">
                                <input type="text" name="title" required lay-verify="required" placeholder="请输入标题名称" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">作者</label>
                            <div class="layui-input-block">
                                <input type="text" name="author" required lay-verify="required" placeholder="请输入作者" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">分类</label>
                            <div class="layui-input-block" style="width: 200px;">
                                <select name="city" lay-verify="required" type="text" name="cateid" required lay-verify="required" placeholder="请输入分类名" autocomplete="off" class="layui-input" id="catename"></select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">阅读次数</label>
                            <div class="layui-input-block">
                                <input type="text" name="click" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">创建时间</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" placeholder="请输入时间" name="time_text1" id="time_text1" autocomplete="off" />
                            </div>
                        </div>

                        <div class="layui-form-item layui-inline" id="sw1">
                            <label class="layui-form-label">是否推荐</label>
                            <input type="checkbox" lay-skin="switch" />
                        </div>
                        <div class="layui-form-item layui-inline" style="margin-left: 10px" id="sw2">
                            <label class="layui-form-label">是否置顶</label>
                            <input type="checkbox" lay-skin="switch" class="switch2" />
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">收藏数量</label>
                            <div class="layui-input-block">
                                <input type="text" name="lovenum" required lay-verify="required" placeholder="请输入收藏数量的名称" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">文章缩略图</label>
                            <div class="layui-input-block">
                                <input type="file" name="file" id="files" required lay-verify="required" placeholder="" autocomplete="off" style="display: none;" class="layui-input" />
                                <button type="button" class="layui-btn layui-btn-xs" id="addFile2">上传文件</button>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">文章标签</label>
                            <div class="layui-input-block">
                                <input type="text" name="tags" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                    </div>

                    <!-- SEO信息模块内容 -->
                    <div class="layui-tab-item">
                        <div class="layui-form-item layui-form-text" style="margin-top: 60px;">
                            <label class="layui-form-label">seo关键字</label>
                            <div class="layui-input-block">
                                <textarea name="keywords" placeholder="请输入seo关键字名称" class="layui-textarea"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text" style="margin-top: 60px;">
                            <label class="layui-form-label">seo的描述</label>
                            <div class="layui-input-block">
                                <textarea name="description" placeholder="请输入seo的描述" class="layui-textarea"></textarea>
                            </div>
                        </div>
                    </div>

                    <!-- 文章内容模块内容 -->
                    <div class="layui-tab-item">
                        <div class="layui-form-item layui-form-text" style="margin-top: 80px;">
                            <label class="layui-form-label">文章内容</label>
                            <div class="layui-input-block">
                                <textarea name="content" placeholder="请输入文章内容名称" style="height:200px ;" class="layui-textarea"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 底部功能按钮 -->
            <div class="layui-form-item get_up bottom">
                <div class="layui-input-block">
                    <button class="layui-btn get_up" lay-submit lay-filter="formDemo">立即发布</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    <a href="" class="layui-btn layui-btn-warm" id="backBtn">返回列表</a>
                </div>
            </div>

        </form>
    </script>
    <script src="https://www.jq22.com/jquery/jquery-2.1.1.js"></script>
    <script src="./js/jquery.min.js"></script>
    <script src="./js/template-web.js"></script>
    <script src="./js/baseURL.js"></script>
    <script src="./js/axios.js"></script>
    <script src="./js/login.js"></script>
    <script src="./js/jquery.table2excel.js"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <script src="./lib/layui/layui.all.js"></script>
    <script src="./lib/jedate-6.5.0/dist/jedate.min.js"></script>
    <script src="./js/article.js"></script>
</body>

</html>